/**
 * 
 */
package demo.tellurium.test.widget;

import org.junit.BeforeClass;
import org.junit.Test;

import demo.tellurium.framework.BaseTelluriumMockJUnitTestCase;
import demo.tellurium.module.widget.CheckBoxDemo;

/**
 * @author roger.xu
 * 
 */
public class CheckBoxWidgetJUnitTestCase extends BaseTelluriumMockJUnitTestCase {
    private static final String HTML_NAME = "checkbox";

    private static CheckBoxDemo demo;

    @BeforeClass
    public static void initUi() {
        registerHtml(HTML_NAME);

        demo = new CheckBoxDemo();
        demo.defineUi();
    }

    @Test
    public void connectTo() {
        connect(HTML_NAME);
        demo.waitForPageToLoad(30000);
        pauseSec(3);
    }

    @Test
    public void testClickCheckBox() {
        console.debug("[testClickCheckBox]");

        demo.doClickCheckBox();
        pauseSec(3);
    }

    @Test
    public void testClickCheckBoxInList() {
        console.debug("[testClickCheckBoxInList]");

        demo.doClickCheckBoxInList(2);
        pauseSec(3);
    }
}
